package com.trust.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.trust.annotation.NotNull;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;

/**
 * @author ccc
 * @desc
 * @since 2023/11/14 18:43
 */
@Data
@ApiModel("药材规格")
@TableName("medicine_standard")
public class MedicineStandard {

    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty("id")
    private Integer id;

    @ApiModelProperty("药材id")
    private Integer medicineId;

    @ApiModelProperty("名称")
    @NotNull(name = "规格名称")
    private String name;

    @ApiModelProperty("规格换算率")
    @NotNull(name = "换算率")
    private BigDecimal rate;

    @ApiModelProperty("可用字符串")
    @TableField(exist = false)
    private String label;
}
